/*
 * @Author: 李琪 liqi@lark2game.com
 * @Date: 2024-12-07 11:58:06
 * @LastEditors: 李琪 liqi@lark2game.com
 * @LastEditTime: 2024-12-07 15:31:50
 * @FilePath: /cramped-room/assets/Script/Base/Singletons.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Singleton')
export default class Singleton {
    private static _instance: any = null;
    public constructor() { }
    public static getInstance<T>(): T {
        if (!this._instance) {
            this._instance = new Singleton();
        }
        return this._instance;
    }
}

